﻿
    using Chain.BLL;
    using Chain.Model;
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

public partial class SysPropagate : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                if (base.Request.QueryString["SymbolID"] != "0")
                {
                    string SymbolID = base.Request.QueryString["SymbolID"].ToString();
                    Chain.Model.SymbolShow modelSymbol = new Chain.BLL.SymbolShow().GetModel(Convert.ToInt32(SymbolID));
                    Chain.Model.SysPropagate modelPropagate = new Chain.BLL.SysPropagate().GetModel(" SymbolID="+SymbolID);
                    this.PropagateID.Value = modelPropagate == null ? "" : modelPropagate.PropagateID.ToString();
                    this.SymbolID.Value = SymbolID;
                    this.SymbolTitle.InnerText = modelSymbol.SymbolTitle;
                    this.txtSymbolTime.InnerText = modelSymbol.SymbolTime.ToString();
                    this.txtPropagateDetail.Value =modelPropagate==null?"": HTMLDecodeText(modelPropagate.PropagateDetail);
                }
                else
                {
                    this.SymbolTitle.InnerText = DateTime.Now.ToString("yyMMddHHmmss");
                    this.spRelaseName.InnerText = PubFunction.UserIDTOName(base._UserID);
                    this.txtSymbolTime.InnerText = DateTime.Now.ToShortDateString();
                }
            }
        }
        public string HTMLDecodeText(string text)
        {
            string stringstr = "";
            if (!string.IsNullOrEmpty(text) && text != "")
            {

                stringstr = text.Replace("&lt;", "<");
                stringstr = text.Replace("&gt;", ">");
                stringstr = System.Web.HttpContext.Current.Server.HtmlDecode(stringstr).Trim();
            }

            return stringstr;

        }
    }


